package com.ruoyi.rsikManage.mapper;

import com.ruoyi.rsikManage.domain.*;
import com.ruoyi.rsikManage.domain.algoTree.AlgoCountVo;
import com.ruoyi.rsikManage.domain.algoTree.AlgoTreeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
@Mapper
public interface AlgorithmMapper {
    List<PlaceCategory> placeCategoryAndPlaceAndAlgorithms2();

    List<Algorithm> selectAlgorithmsByPlaceId(Long placeId);

    List<AlgoCountVo> totalNumberOfAlgosInAlgoTree();

    List<AlgoCountVo> totalNumberOfAlgosInAlgoTreeForUnitCodes(@Param("unitCode") Long unitCode);

    List<AlgoCountVo> totalNumberOfAlgosInAlgoTreeGroup();

    AlgoTreeVo selectAlgoTree(@Param("categoryId") Integer categoryId);

    AlgoTreeVo selectAlgoTreeV2(@Param("categoryId") Integer categoryId,@Param("unitCode") Long unitCode, @Param("unitCodes") List<Long> unitCodes);

    AlgoScenarioRes selectAlgoScenarioList(@Param("unitCode") String unitCode, @Param("category") String category, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    List<CategoryAlarmCount> countCategoryAlarm( @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
